package edu.buffalo.cse.cse486_586.service;

import java.util.Comparator;

import edu.buffalo.cse.cse486_586.entity.VoteMessage;

public class VoteMessageComparator implements Comparator<VoteMessage> {

	@Override
	public int compare(VoteMessage m1, VoteMessage m2) {
		int squ1 = Integer.valueOf(m1.getPurposedSequence());
		int squ2 = Integer.valueOf(m2.getPurposedSequence());
		if( squ1 == squ2 )
			return 0;
		
		return squ1 > squ2 ? 1 : -1;
	}

}
